﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    private List<Type> GetTable() {
        List<Type> tlist = new List<Type>();
        foreach (System.Reflection.Assembly item in AppDomain.CurrentDomain.GetAssemblies())
        {
            foreach (Type t in item.GetTypes())
            {
                object[] attrs = t.GetCustomAttributes(typeof(MaoCaiJun.DataBase.Sys.DataBaseAttribute), true);
                if (attrs.Length == 1)
                {
                    MaoCaiJun.DataBase.Sys.DataBaseAttribute attr = attrs[0] as MaoCaiJun.DataBase.Sys.DataBaseAttribute;
                    if (null != attr && attr.EnumDataBase == MaoCaiJun.DataBase.Sys.EnumDataBase.Class)
                    {
                        tlist.Add(t);
                        //Page.Response.Write("-----" + t.Namespace + "." + t.Name + "" + "<br>");
                    }
                }
            }
        }
        return tlist;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        rptTable.DataSource = GetTable();
        rptTable.DataBind();
    }
}